﻿@model Project_2._2.ViewModels.Create_ViewModels
@{
    ViewBag.Title = "Tạo Tài Khoản Mới";
    Layout = "~/Views/Shared/_AdminLayoutPage.cshtml";
}

@{
    List<SelectListItem> list = new List<SelectListItem>();
    list.Add(new SelectListItem { Text = "Nam", Value = "Nam", Selected = true });
    list.Add(new SelectListItem { Text = "Nữ", Value = "Nữ" });
}



<div class="grid_12">
	<div class="block-border">
	    <div class="block-header">Tạo Tài Khoản Mới
		    @Html.ActionLink("Trở về Danh Sách", "Default", "AdminPerson", null, new { @class = "button" })
	    </div>
		<div class="block-content">

            @using (Html.BeginForm())
            {       
                @Html.ValidationSummary(true) 
                @Html.AntiForgeryToken()
               
                <table  style="padding:10px 0 15px 150px ; line-height:35px">
                    <tr>
                        <td class="align-right">@Html.LabelFor(m => m.UserName)&nbsp;<span style="color:red">*</span></td>
                        <td> 
                            @Html.TextBoxFor(m => m.UserName, new { @class="Textbox" })
                            @Html.ValidationMessageFor(m=>m.UserName)
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m => m.Pass)&nbsp;<span style="color:red">*</span></td>
                        <td>  
                            @Html.PasswordFor(m => m.Pass, new { @class="Textbox" })
                            @Html.ValidationMessageFor(m=>m.Pass)
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m => m.ConPass)&nbsp;<span style="color:red">*</span></td>
                        <td>  
                            @Html.PasswordFor(m => m.ConPass, new { @class="Textbox" })
                            @Html.ValidationMessageFor( m=>m.ConPass)
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m=>m.RoleId)</td>
                        <td>  
                            @{
                                List<SelectListItem> RoleList = new List<SelectListItem>();
                                RoleList.Add(new SelectListItem { Text = "Admin", Value = "1", Selected = true });
                                RoleList.Add(new SelectListItem { Text = "User", Value = "2" });
                            }
                            @Html.DropDownListFor(m => m.RoleId, RoleList , new { @class="select"})  
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m =>m.Name)&nbsp;<span style="color:red">*</span></td>
                        <td>  
                            @Html.TextBoxFor(m => m.Name, new { @class="Textbox"})
                            @Html.ValidationMessageFor(m => m.Name)
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m => m.DOB)&nbsp;<span style="color:red">*</span></td>
                        <td>
                            @Html.TextBoxFor(m => m.DOB, new { @class="Textbox"})
                            @Html.ValidationMessageFor(m => m.DOB )
                        </td>
                        <script src="~/Script/DateTimePicker_Js/jquery.js"></script>
                        <script src="~/Script/DateTimePicker_Js/jquery.datetimepicker.js"></script>
                        <script>
                            jQuery('#DOB').datetimepicker({
                                lang: 'vi',
                                i18n: {
                                    de: {
                                        months: [
                                            'Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4',
                                            'Tháng 5', 'Tháng 6', 'Tháng 7', 'Tháng 8',
                                            'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12',
                                        ],
                                        dayOfWeek: [
                                            "CN", "T2", "T3", "T4",
                                            "T5", "T6", "T7",
                                        ]
                                    }
                                },
                                timepicker: false,
                                format: 'd - m - Y'
                            });

                        </script>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m=>m.GioiTinh)</td>
                        <td>  
                                @Html.DropDownListFor(m => m.GioiTinh, list, new { @class="select"})  
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m =>m.Email)&nbsp;<span style="color:red">*</span></td>
                        <td>  
                            @Html.TextBoxFor(m => m.Email, new { @class="Textbox"})
                            @Html.ValidationMessageFor(m => m.Email)
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m =>m.DienThoai)&nbsp;<span style="color:red">*</span></td>
                        <td>  
                            @Html.TextBoxFor(m => m.DienThoai, new { @class="Textbox"})
                            @Html.ValidationMessageFor(m => m.DienThoai)
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m =>m.DiaChi)&nbsp;<span style="color:red">*</span></td>
                        <td>  
                            @Html.TextAreaFor(m => m.DiaChi, new { @class="TextArea"})
                            @Html.ValidationMessageFor(m => m.DiaChi)
                        </td>
                    </tr>
                    <tr>
                        <td class="align-right">@Html.LabelFor(m =>m.isDelete)&nbsp;<span style="color:red">*</span></td>
                        <td>  
                            @Html.CheckBoxFor(m => m.isDelete)
                            @Html.ValidationMessageFor(m => m.isDelete)
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input type="submit" class="Button" value="Tạo Tài Khoản" />
                        </td>
                    </tr>

                </table>
            }

        </div>
     </div>
</div>
